<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script type="text/javascript">
		//从1加到100,计算其总和
//sum+=2;//sum=0+2;
	var a=1;
	var sum=0;
	while(a<=100){
		sum=a+sum;
		a++;
	}
		document.write(sum);
		
	</script>
</html>